package com.abu.manager.service.impl;


import com.abu.manager.mapper.PermissionMapper;
import com.abu.manager.pojo.Permission;
import com.abu.manager.service.PermissionService;
import com.abu.manager.vo.PermissionVO;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 权限表 服务实现类
 * </p>
 *
 * @author 阿布
 * @since 2021-02-03
 */
@Service
public class PermissionServiceImpl extends ServiceImpl<PermissionMapper, Permission> implements PermissionService {

    @Autowired
    private PermissionMapper permissionMapper;

    @Override
    public List<PermissionVO> queryPermissionTree(Long roleId) {
        return this.permissionMapper.queryPermissionTree(roleId);
    }

    @Override
    public List<PermissionVO> queryAllPermissionList() {
        return this.permissionMapper.selectPermissionList();
    }
}
